www.gusucode.com > 智睿学校网站管理系统 V2.20 > 智睿学校网站管理系统 V2.20\code\UserPo.asp
<!--#include file="Include/conn.asp"--> <!--#include file="Include/Fun_SqlIn.Asp"--> <html xmlns="http://www.w3.org/1999/xhtml" > <head> <meta http-equiv="Content-Type" content="text/html; charset=GB2312" /> <meta http-equiv="Content-Language" content="zh-CN" /> <title>会员中心 - <%=SiteTitle%></title> <meta name="keywords" content="<%=Sitekeywords%>" /> <meta name="description" content="<%=Sitedescription%>" /> <link href="images/style.css" rel="stylesheet" type="text/css" /> <script language="javascript" src="images/zhirui.js"></script> </head> <body> <%head()%> <table width="950" border="0" align="center" cellpadding="0" cellspacing="0" class="main_class"> <tr> <td width="240" valign="top" class="leftCenter" > <!--#include file="Include/login.asp"--> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td class="Ma_left">关于我们</td> </tr> <tr> <td align="left"><div style="margin-left:10px;"><% =WebMenu()%></div></td> </tr> </table> <br> </td> <td width="5"></td> <td valign="top"class="viewright"> <% dim UserName,UserID UserName=session("zhi_rui_s_MemName") UserID=session("zhi_rui_s_userID") If UserName="" or UserID="" then Response.Redirect "UserLogin.asp" Response.End() end if %> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td height="25" style="border-bottom:solid 1px; margin-top:5px;" > <span class="note">您的作品<font color=red><b><%=Mydb("Select Count([ID]) From [zhi_rui_s_po] Where UserID="&UserID,1)(0)%></b></font> 篇 | 未审核 <font color=red><b><%=Mydb("Select Count([ID]) From [zhi_rui_s_po] Where ViewFlag=0 and UserID="&UserID,1)(0)%></b></font> 篇</span></font> </td> </tr> </table> <% dim Result,id,poid,poname,PhotoName,BigPic,AddTime Result=request.QueryString("Result") id=request.QueryString("id") if request.QueryString("poid")<>"" then poid=request.QueryString("poid") end if if request.QueryString("poname")<>"" then poname=request.QueryString("poname") end if call InfoEdit() %> <table width="99%" border="0" cellpadding="0" cellspacing="0" > <form name="editForm" method="post" action="?Action=SaveEdit&Result=<%=Result%>&poid=<%=poid%>&ID=<%=ID%>"> <tr> <td height="24"> <table width="99%" border="0" cellpadding="0" cellspacing="0" id=editNews idth="100%"> <tr> <td width="120" height="24" align="right"> </td> <td> </td> </tr> <tr> <td width="120" height="24" align="right">线路标题:</td> <td><input name="poid" type="hidden" value="<%=poid%>"><input name="poname" type="text" class="input1" id="poname" style="WIDTH: 140;" value="<%=poname%>" maxlength="120"> <font color=red>序号:<%=poid%></font> </td> </tr> <tr> <td height="24" align="right">图片名称:</td> <td><input name="PhotoName" type="text" class="input1" id="PhotoName" style="WIDTH: 150;" value="<%=PhotoName%>" maxlength="150"> </td> </tr> <tr> <td height="24" align="right" valign="top">线路图片:</td> <td> <input name="BigPic" type="text" class="input1" style="WIDTH: 240;" value="<%=BigPic%>" maxlength="100"> <input type="checkbox" onClick="display('upload');" id="mox"/><label for='mox'>上传图片</label><br> <div id="upload" style="display:none;"> <iframe frameborder=0 width=290 height=25 scrolling=no src="Include/upload.asp?action=pro"></iframe> </div> </td> </tr> <tr> <td height="24" align="right">发布时间:</td> <td colspan=4 class=b1_1><input name="AddTime" type="text" class="input1" style="WIDTH: 120;" value="<%=now()%>" maxlength="120"> </td></tr> <tr> <tr> <td height="30" align="right"> </td> <td valign="bottom"><input name="submitSaveEdit" type="submit" class="but1" id="submitSaveEdit" value="保存" style="WIDTH: 80;" ></td> </tr> <tr> <td height="24" align="right"> </td> <td valign="bottom"> </td> </tr> </table> </td> </tr> </form> </table> <% sub InfoEdit() dim Action,rsRepeat,rs,sql Action=request.QueryString("Action") if Action="SaveEdit" then '保存编辑产品 set rs = server.createobject("adodb.recordset") if len(trim(request.Form("PhotoName")))<1 then response.write ("<script language=javascript> alert('名称必填!');history.back(-1);</script>") response.end end if if len(trim(request.Form("BigPic")))<1 then response.write ("<script language=javascript> alert('图片需上传!');history.back(-1);</script>") response.end end if if Result="Add" then '创建产品 sql="select * from zhi_rui_s_po_Photo" rs.open sql,conn,1,3 rs.addnew rs("UserID")=UserID rs("poid")=Request.Form("poid") rs("poname")=trim(Request.Form("poname")) rs("PhotoName")=trim(Request.Form("PhotoName")) rs("BigPic")=trim(Request.Form("BigPic")) rs("AddTime")=trim(Request.Form("AddTime")) end if if Result="Modify" then '修改产品 sql="select * from zhi_rui_s_po_Photo where id="& id rs.open sql,conn,1,3 rs("UserID")=UserID rs("poid")=Request.Form("poid") rs("poname")=trim(Request.Form("poname")) rs("PhotoName")=trim(Request.Form("PhotoName")) rs("BigPic")=trim(Request.Form("BigPic")) rs("AddTime")=trim(Request.Form("AddTime")) end if rs.update rs.close set rs=nothing response.write "<script language=javascript> alert('成功编辑图片!');location.replace('UserList.asp');</script>" else '提取产品 if Result="Modify" then set rs = server.createobject("adodb.recordset") sql="select * from zhi_rui_s_po_Photo where id="& id rs.open sql,conn,1,1 if rs.bof and rs.eof then response.write ("数据库读取记录出错!") response.end end if poid=rs("poid") poname=rs("poname") PhotoName=rs("PhotoName") BigPic=rs("BigPic") AddTime=rs("AddTime") rs.close set rs=nothing end if end if end sub %> </td> </tr> </table> <%Bottom()%> </body> </html>